<?php

    /**
     * @package      Modules
     * @subpackage   Base_Classes_Customs
     *
     * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
     */
    interface Base_Classes_Customs_Interface
    {

    ////////////////////////////////////////////////////////////////////////////
    //                                 Methods                                //
    ////////////////////////////////////////////////////////////////////////////

        /**
         * Prepares form values.
         *
         * @param       DbBase     $element
         * @param       array       $params
         * @return      array
         */
        public static function prepare(DbBase $element, array $params = array());

        /**
         * Validates elements fields
         *
         * Throws a Base_Classes_Customs_Exception if the field is invalid.
         *
         * @throws      Base_Classes_Customs_Exception
         * @param       DbBase      $element
         * @param       string      $fieldname
         * @param       mixed       $value
         *
         */
        public function validate(DbBase $element, $fieldname, $value);

        /**
         * Processes the element
         * 
         * Throws a Base_Classes_Customs_Exception if the element is invalid (global validation).
         *
         * @throws      Base_Classes_Customs_Exception
         * @param       &DbBase     $element
         * @param       array       $params
         */
        public function process(DbBase &$element, array $param = array());
    }